import pandas as pd
from pyecharts import options as opts
from pyecharts.charts import BMap
df=pd.read_excel('2022年咸宁市各县级行政区国内生产总值.xlsx')
data=df[['地铁站','进站量（千人次）']].values.tolist()
bMap=BMap(init_opts=opts.InitOpts(
    width='1000px',height='800px',page_title='地理热力图'
))
for (name,longitude,latitude) in zip(df['地铁站'],df['经度'],df['维度']):
    bMap.add_coordinate(name,longitude,latitude)
bMap.add_schema(baidu_ak='PmSUNz1vB2wZMLui6vGozZkMKQb1Q5AC',
                center=[116.404699,39.899689],zoom=11)
bMap.add(series_name='',data_pair=data,type_='heatmap')
bMap.add(series_name='',data_pair=data,
         type_='scatter',symbol_size=0,
         label_opts=opts.LabelOpts(
             position='top',distance=10,
         ))